using System;

namespace CoreIMSEE.Domain
{
	/// <summary>
	/// This class represents a Barcode that a <see cref="Location"/> or a <see cref="Bar"/>
	/// can have.
	/// An entity can have several Barcodes, although only one Barcode can be assigned as Default.
	/// 
	/// </summary>
    [Serializable]
    public class BarcodeBase
	{
		private int id = 0;
		private Warehouse warehouse;
		//private int objectId;
		//private object theObject;
		private string code;
		private string type;
		private bool isDefault;

		private DateTime timestamp = DateTime.Now;

	    private Location locationObject;

		#region Public properties

		public int Id
		{
			get { return id; }
		}

		public Warehouse Warehouse
		{
			get { return warehouse; }
			set { warehouse = value; }
		}

		public string Code
		{
			get { return code; }
			set { code = value; }
		}

		public string Type
		{
			get { return type; }
			set { type = value; }
		}

		public bool IsDefault
		{
			get { return isDefault; }
			set { isDefault = value; }
		}


	    public DateTime Timestamp
	    {
	        get { return timestamp; }
	    }

	    public Location LocationObject
	    {
	        get { return locationObject;}
	        set { locationObject = value;}
	    }

	    #endregion
	}
    
}